package com.ecoolex.chinadutyfree.retailer.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   直邮商品订单<br>
 *<br>
 * 数据表： direct_mail_goods_order
 *
 */
@Description({"直邮商品订单"})
public class DirectMailGoodsOrder implements Serializable {
    /**
     *
     *   订单Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderId
     */
    @Description({"订单Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer orderId;

    /**
     *
     *   用户Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UserId
     */
    @Description({"用户Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer userId;

    /**
     *
     *   订单编号    <br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderNo
     */
    @Description({"订单编号", "不能为空", "数据长度: 50"})
    @NonNull
    private String orderNo;

    /**
     *
     *   价格币种    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CurrencyType
     */
    @Description({"价格币种", "不能为空", "数据长度: 10"})
    @NonNull
    private String currencyType;

    /**
     *
     *   商品总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.GoodsTotalPrice
     */
    @Description({"商品总价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal goodsTotalPrice;

    /**
     *
     *   运费    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Freight
     */
    @Description({"运费", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal freight;

    /**
     *
     *   运费配置    <br>
     *<br>
     * 字段名： direct_mail_goods_order.FreightRemarks
     */
    @Description({"运费配置", "不能为空", "数据长度: 1000"})
    @NonNull
    private String freightRemarks;

    /**
     *
     *   总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.TotalPrice
     */
    @Description({"总价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal totalPrice;

    /**
     *
     *   税费    <br>
     *<br>
     * 字段名： direct_mail_goods_order.TaxPrice
     */
    @Description({"税费", "数据长度: 18"})
    private BigDecimal taxPrice;

    /**
     *
     *   实付价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.RealPrice
     */
    @Description({"实付价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal realPrice;

    /**
     *
     *   支付编号    <br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentNo
     */
    @Description({"支付编号", "数据长度: 50"})
    private String paymentNo;

    /**
     *
     *   支付时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentTime
     */
    @Description({"支付时间", "数据长度: 26"})
    private Date paymentTime;

    /**
     *
     *   配送方式(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryMannerId
     */
    @Description({"配送方式(待删除字段, 使用的请移除)", "数据长度: 10"})
    private Integer deliveryMannerId;

    /**
     *
     *   发货单号(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryNo
     */
    @Description({"发货单号(待删除字段, 使用的请移除)", "数据长度: 50"})
    private String deliveryNo;

    /**
     *
     *   发货时间(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryTime
     */
    @Description({"发货时间(待删除字段, 使用的请移除)", "数据长度: 26"})
    private Date deliveryTime;

    /**
     *
     *   确认收货时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.ConfirmReceiptTime
     */
    @Description({"确认收货时间", "数据长度: 26"})
    private Date confirmReceiptTime;

    /**
     *
     *   状态; 01-待支付;02-已取消;03-自动取消；04-待发货；05-待收货；10-交易关闭；11-已完成；12-售后中    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Status
     */
    @Description({"状态; 01-待支付;02-已取消;03-自动取消；04-待发货；05-待收货；10-交易关闭；11-已完成；12-售后中", "不能为空", "数据长度: 2"})
    @NonNull
    private String status;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 25"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   订单Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderId
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单Id<br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderId
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取参数<br><br>
     *
     *   用户Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UserId
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置参数<br><br>
     *
     *   用户Id<br>
     *<br>
     * 字段名： direct_mail_goods_order.UserId
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单编号    <br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderNo
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单编号<br>
     *<br>
     * 字段名： direct_mail_goods_order.OrderNo
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   价格币种    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CurrencyType
     */
    public String getCurrencyType() {
        return currencyType;
    }

    /**
     * 设置参数<br><br>
     *
     *   价格币种<br>
     *<br>
     * 字段名： direct_mail_goods_order.CurrencyType
     */
    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType == null ? null : currencyType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商品总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.GoodsTotalPrice
     */
    public BigDecimal getGoodsTotalPrice() {
        return goodsTotalPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品总价格<br>
     *<br>
     * 字段名： direct_mail_goods_order.GoodsTotalPrice
     */
    public void setGoodsTotalPrice(BigDecimal goodsTotalPrice) {
        this.goodsTotalPrice = goodsTotalPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   运费    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Freight
     */
    public BigDecimal getFreight() {
        return freight;
    }

    /**
     * 设置参数<br><br>
     *
     *   运费<br>
     *<br>
     * 字段名： direct_mail_goods_order.Freight
     */
    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }

    /**
     * 获取参数<br><br>
     *
     *   运费配置    <br>
     *<br>
     * 字段名： direct_mail_goods_order.FreightRemarks
     */
    public String getFreightRemarks() {
        return freightRemarks;
    }

    /**
     * 设置参数<br><br>
     *
     *   运费配置<br>
     *<br>
     * 字段名： direct_mail_goods_order.FreightRemarks
     */
    public void setFreightRemarks(String freightRemarks) {
        this.freightRemarks = freightRemarks == null ? null : freightRemarks.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.TotalPrice
     */
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   总价格<br>
     *<br>
     * 字段名： direct_mail_goods_order.TotalPrice
     */
    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   税费    <br>
     *<br>
     * 字段名： direct_mail_goods_order.TaxPrice
     */
    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   税费<br>
     *<br>
     * 字段名： direct_mail_goods_order.TaxPrice
     */
    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   实付价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order.RealPrice
     */
    public BigDecimal getRealPrice() {
        return realPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   实付价格<br>
     *<br>
     * 字段名： direct_mail_goods_order.RealPrice
     */
    public void setRealPrice(BigDecimal realPrice) {
        this.realPrice = realPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付编号    <br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentNo
     */
    public String getPaymentNo() {
        return paymentNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付编号<br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentNo
     */
    public void setPaymentNo(String paymentNo) {
        this.paymentNo = paymentNo == null ? null : paymentNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentTime
     */
    public Date getPaymentTime() {
        return paymentTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付时间<br>
     *<br>
     * 字段名： direct_mail_goods_order.PaymentTime
     */
    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   配送方式(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryMannerId
     */
    public Integer getDeliveryMannerId() {
        return deliveryMannerId;
    }

    /**
     * 设置参数<br><br>
     *
     *   配送方式(待删除字段, 使用的请移除)<br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryMannerId
     */
    public void setDeliveryMannerId(Integer deliveryMannerId) {
        this.deliveryMannerId = deliveryMannerId;
    }

    /**
     * 获取参数<br><br>
     *
     *   发货单号(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryNo
     */
    public String getDeliveryNo() {
        return deliveryNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   发货单号(待删除字段, 使用的请移除)<br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryNo
     */
    public void setDeliveryNo(String deliveryNo) {
        this.deliveryNo = deliveryNo == null ? null : deliveryNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   发货时间(待删除字段, 使用的请移除)    <br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryTime
     */
    public Date getDeliveryTime() {
        return deliveryTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   发货时间(待删除字段, 使用的请移除)<br>
     *<br>
     * 字段名： direct_mail_goods_order.DeliveryTime
     */
    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   确认收货时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.ConfirmReceiptTime
     */
    public Date getConfirmReceiptTime() {
        return confirmReceiptTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   确认收货时间<br>
     *<br>
     * 字段名： direct_mail_goods_order.ConfirmReceiptTime
     */
    public void setConfirmReceiptTime(Date confirmReceiptTime) {
        this.confirmReceiptTime = confirmReceiptTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   状态; 01-待支付;02-已取消;03-自动取消；04-待发货；05-待收货；10-交易关闭；11-已完成；12-售后中    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Status
     */
    public String getStatus() {
        return status;
    }

    /**
     * 设置参数<br><br>
     *
     *   状态; 01-待支付;02-已取消;03-自动取消；04-待发货；05-待收货；10-交易关闭；11-已完成；12-售后中<br>
     *<br>
     * 字段名： direct_mail_goods_order.Status
     */
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： direct_mail_goods_order.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： direct_mail_goods_order.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： direct_mail_goods_order.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： direct_mail_goods_order.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        orderId("OrderId", "orderId", "INTEGER", false),
        userId("UserId", "userId", "INTEGER", false),
        orderNo("OrderNo", "orderNo", "VARCHAR", false),
        currencyType("CurrencyType", "currencyType", "VARCHAR", false),
        goodsTotalPrice("GoodsTotalPrice", "goodsTotalPrice", "DECIMAL", false),
        freight("Freight", "freight", "DECIMAL", false),
        freightRemarks("FreightRemarks", "freightRemarks", "VARCHAR", false),
        totalPrice("TotalPrice", "totalPrice", "DECIMAL", false),
        taxPrice("TaxPrice", "taxPrice", "DECIMAL", false),
        realPrice("RealPrice", "realPrice", "DECIMAL", false),
        paymentNo("PaymentNo", "paymentNo", "VARCHAR", false),
        paymentTime("PaymentTime", "paymentTime", "TIMESTAMP", false),
        deliveryMannerId("DeliveryMannerId", "deliveryMannerId", "INTEGER", false),
        deliveryNo("DeliveryNo", "deliveryNo", "VARCHAR", false),
        deliveryTime("DeliveryTime", "deliveryTime", "TIMESTAMP", false),
        confirmReceiptTime("ConfirmReceiptTime", "confirmReceiptTime", "TIMESTAMP", false),
        status("Status", "status", "VARCHAR", true),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}